package com.example.demo.hello;

import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * Created with IntelliJ IDEA.
 *
 * @Author: anlu
 * @Date: 2021/06/24
 * @Description: 用注册的方式实现
 */
@Component
@RabbitListener(queues = "an.hello")
public class HelloReceiver {

    @RabbitHandler
    public void process(String hello) {
        System.out.println("HelloReceiver : " + hello);
    }
}
